function mouseChange(obj){
	obj.hover(function(){
		obj.css({
			cursor: "pointer"
		})
	},function(){
		obj.css({
			cursor:"auto"
		})
	})
}
mouseChange($(".littlecheckBox,.calcNow,#online,.addwait-1-1,.addwait-1-3"))

// function select(obj){
// 	let ocheckBox11=document.querySelectorAll(".checkBox11");
// 	for(let i=0;i<ocheckBox11.length;i++){
// 		obj.onclick=function(){
// 			if(this.style.backgroundColor=="white"){
// 				this.style.backgroundColor="black"
// 			}else if(this.style.backgroundColor=="black"){
// 				this.style.backgroundColor="white"
// 			}
// 			if(this.style.backgroundColor=="white"){
// 				
// 			}
// 		}
// 	}
// }

function totalprice(){
	let oprice=document.querySelectorAll(".thingsprice-3");
	let singlepricenum=document.querySelectorAll(".singlepricenum");
	
	oprice[0].innerHTML=Number(singlepricenum[0].innerHTML)+Number(singlepricenum[1].innerHTML)
	oprice[1].innerHTML=parseInt(-Number(oprice[0].innerHTML)/3)

	oprice[3].innerHTML=Number(oprice[0].innerHTML)+Number(oprice[1].innerHTML)+Number(oprice[2].innerHTML)
}


function litteNun(price,num,pricenum){
	pricenum.innerHTML=num*price ;
	
}

function numbernum(){
	let totalNum=document.querySelector(".totalNum")
	let numbs=document.querySelectorAll(".addwait-1-2")
	totalNum.innerHTML=Number(numbs[0].innerHTML)+Number(numbs[1].innerHTML)
}

function Numchange(obj1,obj2){
	obj1.onclick=function(){
		if(this.nextElementSibling.innerHTML>0){
			this.nextElementSibling.innerHTML-=1;
		}
		let a=Number(this.parentNode.previousElementSibling.innerHTML) ;
		let b=this.parentNode.nextElementSibling;
		let c=this.nextElementSibling.innerHTML
		litteNun(a,c,b)	
		totalprice()
		numbernum()
	}
	obj2.onclick=function(){
		this.previousElementSibling.innerHTML=Number(this.previousElementSibling.innerHTML)+1;
		let a=Number(this.parentNode.previousElementSibling.innerHTML) ;
		let b=this.parentNode.nextElementSibling;
		let c=this.previousElementSibling.innerHTML;
		litteNun(a,c,b)
		totalprice()
		numbernum()
	}
	// point.innerHTML=Number(Num.innerHTML) *335;		
}
let less=document.querySelectorAll(".addwait-1-1");
let more=document.querySelectorAll(".addwait-1-3");
for(let i=0;i<less.length;i++){
	Numchange(less[i],more[i]);
}





